//
// Created by Administrator on 2024/10/21.
//


#include "OkHandler.h"
#include "../processor/ResourcesProcessor.h"

using json = nlohmann::json;

bool OkHandler::handleGet(CivetServer *server, struct mg_connection *conn)  {

    json json_data;
    json_data["msg"] = "ok";
    json_data["data"] = json::object();
    std::string s = json_data.dump(0);
    char *c = const_cast<char *>(s.c_str());
    mg_send_http_ok(conn, "application/json; charset=utf-8", s.size());
    mg_write(conn, c, s.size());
    return true;
}


